#ifndef PLAYER_H
#define PLAYER_H

#include "playerGFX.h"
#include "player_gfx.h"

class player : public Character
{
public:
	player(u16 x, u16 y) { _x = x; _y = y; _oldx = x; _oldy = y;}
	void RenderStats(uint16 *fb);
};

void player::RenderStats(uint16 *fb)
{
	drawShape(0, 0, 255, 30, fb, (RGB15(5, 20, 5) | BIT(15)));
	drawShape(2, 2, 251, 26, fb, (RGB15(3, 15, 3) | BIT(15)));
	for(uint16 i=0; i < 3; i++)
	{	
		int frame = _curHealth - (2 - i)*4;
		if (frame < 0) frame = 0;
		if (frame > 4) frame = 4;
		uint16 x = (i*-20)+45;
		uint16 y = 5;
		Render(fb, x, y, health_palette, player_health, frame);
	}
}

#endif //PLAYER_H